package com.wxg.ch01.good;

import com.wxg.ch01.bad.Knight;
import com.wxg.ch01.bad.QuestException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class KnightMain {
    public static void main(String[] args) throws QuestException {
        ApplicationContext context =
                new ClassPathXmlApplicationContext("ch01/springSetting1.6.xml");

        Knight knight = (Knight) context.getBean("knight");
        knight.embarkOnQuest();
    }
}
